package command;

import controller.GUIController;

import view.ChatScreen;
import view.DiscussionTab;

public class CloseTab implements ICommand {

	DiscussionTab comp;
	
	public CloseTab(DiscussionTab comp)
	{
		this.comp = comp;
	}

	public void execute()
	{
		ChatScreen chatscreen = GUIController.getInstance().gui.getChatScreen();
		chatscreen.removeDiscussion( comp.getContact().getIpAddr() );
		chatscreen.getChatList().clearSelection();
	}
}
